import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import locale from 'element-plus/lib/locale/lang/zh-cn'
import 'assets/css/BigData.css'
import 'assets/css/bootstrap-table.css'
import 'assets/css/bootstrap.min.css'
import 'assets/css/default.css'
import 'assets/css/index.css'
import 'assets/css/index01.css'
import 'assets/css/Security_operation.css'
import * as echarts from 'echarts' // 引入echarts
import 'echarts-gl'
// import 'default-passive-events'
// import jQuery from 'jquery'
// import 'bootstrap'
// import 'bootstrap/dist/css/bootstrap.min.css'
// import 'bootstrap/dist/js/bootstrap.min.js'
import 'assets/css/bootstrap.min.css'
import store from './store'
import dataV from '@jiaminghi/data-view'
// import utils from "./lib/utils";
import hint from '@/common/hint' // message提示



const app = createApp(App);
// vue3 给原型上挂载属性
app.config.globalProperties.$echarts = echarts
app.config.globalProperties.$hint = hint
router.beforeEach((to, from, next) => {
    store.dispatch('onLoading', true);
    console.log(store.state.isLoading, to, from);
    next();
});
// 这里为了让效果明显一些加了延时
router.afterEach((to, from) => {
    store.dispatch('onLoading', false);
    console.log(store.state.isLoading, to, from);
});
app.use(router).use(store).use(dataV).use(ElementPlus, { locale }).mount('#app')
